home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / util / shell / axsh_1_3_demo.lha / InstallDisk.lha / Install-AXsh_2.0 < prev    next >
Text File  |  1993-02-11  |  5KB  |  214 lines

  1. ; script to install AXsh (WB 2.0)
  2.  
  3.     ; set up a error cleanup routine
  4. (onerror (makeassign "AXsh" (safe)))
  5.  
  6. (set #bad-kick
  7. (cat "You must be using Kickstart 2.04 to install using this script."
  8.     " Double-click the 'AXsh-Install_1.3' icon to install AXsh on"
  9.     " Kickstart 1.2 or 1.3 machines."
  10. ))
  11.  
  12.  
  13. (complete 0)
  14.     ; just in case the installation was restarted
  15.  
  16. (makeassign "AXsh" (safe))        ; start fresh
  17.  
  18.     ; check kick
  19. (if (< (/ (getversion) 65536) 37)
  20. (    (abort #bad-kick)))
  21.  
  22.     ; see if this is really an update
  23.  
  24. (set is_update 0)
  25. (set AXsh_dest (getassign "AXsh" "a"))
  26.  
  27.     ; if update, be sure they want program in same place
  28. (if AXsh_dest
  29.     (if (askbool    (prompt "Your current copy of AXsh appears to be located in the drawer named \""
  30.                 AXsh_dest
  31.                 "\". Do you want the update installed in that drawer?" )
  32.             (help    "The installer has determined that you may already have a "
  33.                 "copy of AXsh installed on your system. If this is wrong or "
  34.                 "you want the update installed elsewhere, select NO as an "
  35.                 "answer. Otherwise, select YES."
  36.             )
  37.             (default 1)
  38.         )
  39.  
  40.         (set is_update 1)
  41.  
  42.         (set AXsh_dest
  43.             (askdir    (prompt "In which disk or drawer should AXsh be installed?")
  44.                 (help @askdir-help)
  45.                 (default @default-dest)
  46.             )
  47.         )
  48.     )
  49.  
  50.  
  51. ; else if not an update, get a location for program
  52.     (set AXsh_dest
  53.         (askdir    (prompt "In which disk or drawer should AXsh be installed?")
  54.             (help @askdir-help)
  55.             (default @default-dest)
  56.         )
  57.     )
  58. )
  59.  
  60.  
  61. ; now lock on to volume 'AXsh'
  62.  
  63. (askdisk
  64.     (prompt "Please insert \n the master program disk \n labeled \"AXshPack\".")
  65.     (help    "The AXsh program and other options will be copied "
  66.         "from the \"AXsh\" into your system.")
  67.     (dest  "AXshPack")
  68.     (newname "AXsh")
  69. )
  70.  
  71. ; make drawer & icon if not there
  72. (if (not is_update) (makedir AXsh_dest (infos)))
  73.  
  74.     ; at this point we have a valid destination, so we tell installer where
  75.     ; the application will end up so the exit page will be correct -- also,
  76.     ; the installation log file (if any) will be copied to the destination
  77. (set @default-dest AXsh_dest)
  78.  
  79. (set whichfiles 
  80.     (askoptions
  81.         (prompt "Please select the files to be copied")
  82.         (help    "This allows you to select only certain parts of the AXsh "
  83.             "system to be installed on your hard drive. For normal installation "
  84.             "select all the items")
  85.         (choices "AXsh system"
  86.              "Manual pages"
  87.              "WB launchable system services")
  88.     )
  89. )
  90.  
  91.  
  92. (if    (in whichfiles 0)
  93.     (    (makedir (tackon AXsh_dest "bin")    (infos))
  94.         (makedir (tackon AXsh_dest "etc")    (infos))
  95.         (makedir (tackon AXsh_dest "dev")    (infos))
  96.         (makedir (tackon AXsh_dest "home")    (infos))
  97.         (makedir (tackon AXsh_dest "usr")    (infos))
  98.         (makedir (tackon AXsh_dest "storage")    (infos))
  99.  
  100.         (copyfiles
  101.             (source "AXshPack:bin")
  102.             (dest (tackon AXsh_dest "bin"))
  103.             (infos)    (all)
  104.         )
  105.  
  106.         (copyfiles
  107.             (source "AXshPack:dev")
  108.             (dest (tackon AXsh_dest "dev"))
  109.             (infos)    (all)
  110.         )
  111.  
  112.         (copyfiles
  113.             (source "AXshPack:etc")
  114.             (dest (tackon AXsh_dest "etc"))
  115.             (infos)    (all)
  116.         )
  117.  
  118.         (complete 50)
  119.  
  120.         (copyfiles
  121.             (source "AXshPack:home")
  122.             (dest (tackon AXsh_dest "home"))
  123.             (infos)    (all)
  124.         )
  125.  
  126.         (copyfiles
  127.             (source "AXshPack:usr")
  128.             (dest (tackon AXsh_dest "usr"))
  129.             (infos)    (all)
  130.         )
  131.  
  132.         (copyfiles
  133.             (source "AXshPack:info")
  134.             (dest (tackon AXsh_dest "info"))
  135.             (infos)    (all)
  136.         )
  137.  
  138.         (copyfiles
  139.             (source "AXshPack:storage")
  140.             (dest (tackon AXsh_dest "storage"))
  141.             (infos)    (all)
  142.         )
  143.         (copyfiles
  144.             (source "AXshPack:AXsh.info")
  145.             (dest AXsh_dest)
  146.         )
  147.     )
  148. )
  149.  
  150. (complete 80)
  151.  
  152. (if    (in whichfiles 1)
  153.     (
  154.         (copyfiles
  155.             (source "AXshPack:man")
  156.             (dest (tackon AXsh_dest "man"))
  157.             (infos)    (all)
  158.         )
  159.         (copyfiles
  160.             (source "AXshPack:AXshUpdates1.3")
  161.             (dest AXsh_dest)
  162.             (infos)
  163.         )
  164.     )
  165. )
  166.  
  167. (if    (in whichfiles 2)
  168.     (
  169.         (copyfiles
  170.             (source "AXshPack:storage/AX-Sysghost.info")
  171.             (dest "SYS:WBStartup")
  172.         )
  173.         (copyfiles
  174.             (source "AXshPack:storage/AX-Server.info")
  175.             (dest "SYS:WBStartup")
  176.         )
  177.         (copyfiles
  178.             (source "AXshPack:storage/DosDrivers")
  179.             (dest "DEVS:DosDrivers")
  180.             (all) (infos)
  181.         )
  182.         (copyfiles
  183.             (source "AXshPack:bin/AXAUX-Handler")
  184.             (dest "L:")
  185.         )
  186.     )
  187. )
  188.  
  189.  
  190. (complete 95)
  191.  
  192.     ; modify S:User-Startup
  193.  
  194. (startup "AXsh"
  195.     (prompt
  196.         "I need to add \"assign AXsh: " AXsh_dest "\" to the \"S:user-startup\" "
  197.         "so that your system will be properly configured to use AXsh.")
  198.     (help "Do this or AXsh won't work!!")
  199.     (command "ASSIGN AXsh: \"" AXsh_dest "\"\n"
  200.     )
  201. )
  202.  
  203.     ; reinitialize assigns
  204. (if (not @pretend) (makeassign "AXsh" AXsh_dest))
  205.  
  206.  
  207. (complete 100)
  208.  
  209.     ; cleanup
  210. (makeassign "AXshPack" (safe))
  211.  
  212.     ; this is not strictly necessary, but doesn't hurt
  213. (exit)
  214.